<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>伪元素选择器 | 你好,欢迎来到MyNote</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../lesson/css/0724-2.html" />
    
    
    <link rel="prev" href="../../lesson/css/扩展.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.1.6"
        data-chapter-title="伪元素选择器"
        data-filepath="lesson/css/扩展2.md"
        data-basepath="../.."
        data-revision="Thu Aug 31 2017 12:00:31 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="lesson/html/HTML.html">
            
                
                    <a href="../../lesson/html/HTML.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        一.HTML
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="lesson/html/20170718.html">
            
                
                    <a href="../../lesson/html/20170718.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        第一节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="lesson/html/0718-3.html">
            
                
                    <a href="../../lesson/html/0718-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.1.</b>
                        
                        a标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="lesson/html/0718-2.html">
            
                
                    <a href="../../lesson/html/0718-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.2.</b>
                        
                        注释标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.3" data-path="lesson/html/0718-1.html">
            
                
                    <a href="../../lesson/html/0718-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.3.</b>
                        
                        块级和行内元素
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="lesson/html/20170719.html">
            
                
                    <a href="../../lesson/html/20170719.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        第二节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="lesson/html/0719-3.html">
            
                
                    <a href="../../lesson/html/0719-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.1.</b>
                        
                        实体字符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="lesson/html/0719-4.html">
            
                
                    <a href="../../lesson/html/0719-4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.2.</b>
                        
                        文本格式化
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="lesson/html/0719-1.html">
            
                
                    <a href="../../lesson/html/0719-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.3.</b>
                        
                        audio音频标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="lesson/html/0719-2.html">
            
                
                    <a href="../../lesson/html/0719-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.4.</b>
                        
                        video音频标签
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="lesson/html/20170720.html">
            
                
                    <a href="../../lesson/html/20170720.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        第三节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="lesson/html/input.html">
            
                
                    <a href="../../lesson/html/input.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.1.</b>
                        
                        课后补充
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="lesson/html/0720-1.html">
            
                
                    <a href="../../lesson/html/0720-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.2.</b>
                        
                        HTML表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="lesson/html/0720-2.html">
            
                
                    <a href="../../lesson/html/0720-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.3.</b>
                        
                        form表单
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="lesson/html/20170721.html">
            
                
                    <a href="../../lesson/html/20170721.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        第四节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="lesson/html/0721-5.html">
            
                
                    <a href="../../lesson/html/0721-5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.1.</b>
                        
                        icon
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="lesson/html/0721-2.html">
            
                
                    <a href="../../lesson/html/0721-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.2.</b>
                        
                        自定义列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="lesson/html/0721-3.html">
            
                
                    <a href="../../lesson/html/0721-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.3.</b>
                        
                        iframe内嵌框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="lesson/html/0721-4.html">
            
                
                    <a href="../../lesson/html/0721-4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.4.</b>
                        
                        H5的语义化标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="lesson/html/0721-1.html">
            
                
                    <a href="../../lesson/html/0721-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.5.</b>
                        
                        图片的热区hotmap
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="lesson/css/CSS.html">
            
                
                    <a href="../../lesson/css/CSS.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        二.CSS
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="lesson/css/20170724.html">
            
                
                    <a href="../../lesson/css/20170724.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        第一节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="lesson/css/0724-1.html">
            
                
                    <a href="../../lesson/css/0724-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.1.</b>
                        
                        元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="lesson/css/0724-3.html">
            
                
                    <a href="../../lesson/css/0724-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.2.</b>
                        
                        ID选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="lesson/css/0724-4.html">
            
                
                    <a href="../../lesson/css/0724-4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.3.</b>
                        
                        关系选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.4" data-path="lesson/css/0724-5.html">
            
                
                    <a href="../../lesson/css/0724-5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.4.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.5" data-path="lesson/css/扩展.html">
            
                
                    <a href="../../lesson/css/扩展.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.5.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.1.6" data-path="lesson/css/扩展2.html">
            
                
                    <a href="../../lesson/css/扩展2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.6.</b>
                        
                        伪元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.7" data-path="lesson/css/0724-2.html">
            
                
                    <a href="../../lesson/css/0724-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.7.</b>
                        
                        class类选择器
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="lesson/css/20170725.html">
            
                
                    <a href="../../lesson/css/20170725.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        第二节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="lesson/css/0725-1.html">
            
                
                    <a href="../../lesson/css/0725-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.1.</b>
                        
                        字体样式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="lesson/css/0725-2.html">
            
                
                    <a href="../../lesson/css/0725-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.2.</b>
                        
                        文本描述
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="lesson/css/0725-3.html">
            
                
                    <a href="../../lesson/css/0725-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.3.</b>
                        
                        文字阴影
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.4" data-path="lesson/css/0725-4.html">
            
                
                    <a href="../../lesson/css/0725-4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.4.</b>
                        
                        字体嵌入
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.5" data-path="lesson/css/0725-5.html">
            
                
                    <a href="../../lesson/css/0725-5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.5.</b>
                        
                        CSS颜色
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="lesson/css/20170726.html">
            
                
                    <a href="../../lesson/css/20170726.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        第三节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="lesson/css/0726-1.html">
            
                
                    <a href="../../lesson/css/0726-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.1.</b>
                        
                        border边框
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="lesson/css/0726-2.html">
            
                
                    <a href="../../lesson/css/0726-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.2.</b>
                        
                        background背景
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="lesson/css/20170727.html">
            
                
                    <a href="../../lesson/css/20170727.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        第四节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.4.1" data-path="lesson/css/0727-2.html">
            
                
                    <a href="../../lesson/css/0727-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.1.</b>
                        
                        文字溢出
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.2" data-path="lesson/css/0727-3.html">
            
                
                    <a href="../../lesson/css/0727-3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.2.</b>
                        
                        word-break
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4.3" data-path="lesson/css/0727-1.html">
            
                
                    <a href="../../lesson/css/0727-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.3.</b>
                        
                        文字对齐方式
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="lesson/css/20170728.html">
            
                
                    <a href="../../lesson/css/20170728.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        第五节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.5.1" data-path="lesson/css/0728-1.html">
            
                
                    <a href="../../lesson/css/0728-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.1.</b>
                        
                        定位
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5.2" data-path="lesson/css/0728-2.html">
            
                
                    <a href="../../lesson/css/0728-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.2.</b>
                        
                        z-index
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="lesson/css/20170731.html">
            
                
                    <a href="../../lesson/css/20170731.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        第六节课
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7" data-path="lesson/css/20170801.html">
            
                
                    <a href="../../lesson/css/20170801.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.</b>
                        
                        第七节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.7.1" data-path="lesson/css/0801-2.html">
            
                
                    <a href="../../lesson/css/0801-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.1.</b>
                        
                        git安装使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.7.2" data-path="lesson/css/0801-1.html">
            
                
                    <a href="../../lesson/css/0801-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.7.2.</b>
                        
                        SASS安装使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.8" data-path="lesson/css/20170802.html">
            
                
                    <a href="../../lesson/css/20170802.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.</b>
                        
                        第八节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.8.1" data-path="lesson/css/0802-1.html">
            
                
                    <a href="../../lesson/css/0802-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.1.</b>
                        
                        css3 过渡（transition）
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.8.2" data-path="lesson/css/0802-2.html">
            
                
                    <a href="../../lesson/css/0802-2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.8.2.</b>
                        
                        css3 变换（transform）
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.9" data-path="lesson/css/20170803.html">
            
                
                    <a href="../../lesson/css/20170803.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.9.</b>
                        
                        第九节课
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.10" data-path="lesson/css/20170804.html">
            
                
                    <a href="../../lesson/css/20170804.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.</b>
                        
                        第十节课
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.10.1" data-path="lesson/css/0804-1.html">
            
                
                    <a href="../../lesson/css/0804-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.10.1.</b>
                        
                        滤镜
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="lesson/media/media.html">
            
                
                    <a href="../../lesson/media/media.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        三.项目期间
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="lesson/css/20170807.html">
            
                
                    <a href="../../lesson/css/20170807.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        鲁班项目(第一天)
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="lesson/css/20170808.html">
            
                
                    <a href="../../lesson/css/20170808.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.1.</b>
                        
                        鲁班项目(第二天)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="lesson/css/20170809.html">
            
                
                    <a href="../../lesson/css/20170809.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.2.</b>
                        
                        鲁班项目(第三天)
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="lesson/css/20170811.html">
            
                
                    <a href="../../lesson/css/20170811.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.3.</b>
                        
                        鲁班项目(第四天)
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="lesson/viewport/20170814.html">
            
                
                    <a href="../../lesson/viewport/20170814.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        viewport
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.2.1" data-path="lesson/viewport/20170814-1.html">
            
                
                    <a href="../../lesson/viewport/20170814-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.1.</b>
                        
                        viewport特性
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="lesson/viewport/20170815.html">
            
                
                    <a href="../../lesson/viewport/20170815.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        移动端项目
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="lesson/viewport/20170816.html">
            
                
                    <a href="../../lesson/viewport/20170816.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.1.</b>
                        
                        倒霉
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1.1" data-path="lesson/viewport/0816-1.html">
            
                
                    <a href="../../lesson/viewport/0816-1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.1.1.</b>
                        
                        css长度单位
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="lesson/mobile-project/20170817project.html">
            
                
                    <a href="../../lesson/mobile-project/20170817project.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.2.</b>
                        
                        mobile项目入手
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.3" data-path="lesson/mobile-project/20170818.html">
            
                
                    <a href="../../lesson/mobile-project/20170818.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.3.</b>
                        
                        记录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.4" data-path="lesson/viewport/20170821.html">
            
                
                    <a href="../../lesson/viewport/20170821.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.4.</b>
                        
                        项目中所遇的问题
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.5" data-path="lesson/viewport/20170822.html">
            
                
                    <a href="../../lesson/viewport/20170822.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.5.</b>
                        
                        当日总结
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.6" data-path="lesson/viewport/20170823.html">
            
                
                    <a href="../../lesson/viewport/20170823.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.6.</b>
                        
                        上交测试版
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.7" data-path="lesson/viewport/20170824.html">
            
                
                    <a href="../../lesson/viewport/20170824.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.7.</b>
                        
                        当日总结
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="lesson/css/20170830.html">
            
                
                    <a href="../../lesson/css/20170830.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        接触框架
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="lesson/css/20170831.html">
            
                
                    <a href="../../lesson/css/20170831.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        语法与规则 Rules
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >你好,欢迎来到MyNote</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="&#x4F2A;&#x5BF9;&#x8C61;&#xFF08;&#x4F2A;&#x5143;&#x7D20;&#xFF09;&#x9009;&#x62E9;&#x7B26;&#xFF1A;">&#x4F2A;&#x5BF9;&#x8C61;&#xFF08;&#x4F2A;&#x5143;&#x7D20;&#xFF09;&#x9009;&#x62E9;&#x7B26;&#xFF1A;</h2>
<blockquote>
<p>&#x6CE8;&#xFF1A;&#x5355;&#x5192;&#x53F7;CSS2 &#x8FC7;&#x65F6;&#x8BED;&#x6CD5; (&#x4EC5;&#x7528;&#x6765;&#x652F;&#x6301; IE8)</p>
</blockquote>
<table>
<thead>
<tr>
<th style="text-align:center">E:first-letter/E::first-letter</th>
<th style="text-align:center">CSS1/3</th>
<th style="text-align:center">&#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;&#x5185;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x5B57;&#x7B26;&#x7684;&#x6837;&#x5F0F;&#x3002;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">E:first-line/E::first-line</td>
<td style="text-align:center">CSS1/3</td>
<td style="text-align:center">&#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;&#x5185;&#x7684;&#x7B2C;&#x4E00;&#x884C;&#x7684;&#x6837;&#x5F0F;&#x3002;</td>
</tr>
<tr>
<td style="text-align:center">E:before/E::before</td>
<td style="text-align:center">CSS2/3</td>
<td style="text-align:center">&#x8BBE;&#x7F6E;&#x5728;&#x5BF9;&#x8C61;&#x524D;&#xFF08;&#x4F9D;&#x636E;&#x5BF9;&#x8C61;&#x6811;&#x7684;&#x903B;&#x8F91;&#x7ED3;&#x6784;&#xFF09;&#x53D1;&#x751F;&#x7684;&#x5185;&#x5BB9;&#x3002;&#x7528;&#x6765;&#x548C;content&#x5C5E;&#x6027;&#x4E00;&#x8D77;&#x4F7F;&#x7528;</td>
</tr>
<tr>
<td style="text-align:center">E:after/E::after</td>
<td style="text-align:center">CSS2/3</td>
<td style="text-align:center">&#x8BBE;&#x7F6E;&#x5728;&#x5BF9;&#x8C61;&#x540E;&#xFF08;&#x4F9D;&#x636E;&#x5BF9;&#x8C61;&#x6811;&#x7684;&#x903B;&#x8F91;&#x7ED3;&#x6784;&#xFF09;&#x53D1;&#x751F;&#x7684;&#x5185;&#x5BB9;&#x3002;&#x7528;&#x6765;&#x548C;content&#x5C5E;&#x6027;&#x4E00;&#x8D77;&#x4F7F;&#x7528;</td>
</tr>
<tr>
<td style="text-align:center">E::placeholder</td>
<td style="text-align:center">CSS3</td>
<td style="text-align:center">&#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;&#x6587;&#x5B57;&#x5360;&#x4F4D;&#x7B26;&#x7684;&#x6837;&#x5F0F;&#x3002;</td>
</tr>
<tr>
<td style="text-align:center">E::selection</td>
<td style="text-align:center">CSS3</td>
<td style="text-align:center">&#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;&#x88AB;&#x9009;&#x62E9;&#x65F6;&#x7684;&#x989C;&#x8272;&#x3002;</td>
</tr>
</tbody>
</table>
<blockquote>
<p><strong>&#x6CE8;&#x610F;&#xFF1A;</strong>CSS3&#x5C06;&#x4F2A;&#x5BF9;&#x8C61;&#x9009;&#x62E9;&#x7B26;(Pseudo-Element Selectors)&#x524D;&#x9762;&#x7684;&#x5355;&#x4E2A;&#x5192;&#x53F7;(:)&#x4FEE;&#x6539;&#x4E3A;&#x53CC;&#x5192;&#x53F7;(::)&#x7528;&#x4EE5;&#x533A;&#x522B;&#x4F2A;&#x7C7B;&#x9009;&#x62E9;&#x7B26;(Pseudo-Classes Selectors)&#xFF0C;&#x4F46;&#x4EE5;&#x524D;&#xFF08;css2&#x7248;&#x672C;&#xFF09;&#x7684;&#x5199;&#x6CD5;&#x4ECD;&#x7136;&#x6709;&#x6548;&#x3002;<br>    <strong>&#x6CE8;&#x610F;&#xFF1A;css3&#x589E;&#x52A0;&#x4E86;&#x65B0;&#x7684;&#x5C5E;&#x6027;&#x503C;&#xFF1A;E::placeholder&#x3001;E::selection</strong></p>
</blockquote>
<h3 id="1-efirstletterefirstletter">1. E:first-letter/E::first-letter</h3>
<pre><code>&#x8BED;&#x6CD5;&#xFF1A;
E:first-letter/E::first-letter { xxx }
&#x8BF4;&#x660E;&#xFF1A;
&#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;&#x5185;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x5B57;&#x7B26;&#x7684;&#x6837;&#x5F0F;&#x3002;

&#x6B64;&#x4F2A;&#x5BF9;&#x8C61;&#x4EC5;&#x4F5C;&#x7528;&#x4E8E;&#x5757;&#x5BF9;&#x8C61;&#x3002;&#x5185;&#x8054;&#x5BF9;&#x8C61;&#x8981;&#x4F7F;&#x7528;&#x8BE5;&#x4F2A;&#x5BF9;&#x8C61;&#xFF0C;&#x5FC5;&#x987B;&#x5148;&#x5C06;&#x5176;&#x8BBE;&#x7F6E;&#x4E3A;&#x5757;&#x7EA7;&#x5BF9;&#x8C61;&#x3002;
&#x8BE5;&#x4F2A;&#x7C7B;&#x5E38;&#x88AB;&#x7528;&#x6765;&#x914D;&#x5408;font-size&#x5C5E;&#x6027;&#x548C;float&#x5C5E;&#x6027;&#x5236;&#x4F5C;&#x9996;&#x5B57;&#x4E0B;&#x6C89;&#x6548;&#x679C;&#x3002;
IE6&#x5728;&#x4F7F;&#x7528;&#x8BE5;&#x9009;&#x62E9;&#x7B26;&#x65F6;&#x6709;&#x4E2A;&#x663E;&#x5F0F;&#x7684;BUG&#xFF1A;&#x9009;&#x62E9;&#x7B26;&#x4E0E;&#x5305;&#x542B;&#x89C4;&#x5219;&#x7684;&#x82B1;&#x62EC;&#x53F7;&#x4E4B;&#x95F4;&#x4E0D;&#x80FD;&#x7D27;&#x6328;&#x7740;&#xFF0C;&#x9700;&#x7559;&#x6709;&#x7A7A;&#x683C;&#x6216;&#x6362;&#x884C;&#x3002;&#x540C;&#x65F6;&#x8FD8;&#x5B58;&#x5728;&#x8BE5;BUG&#x7684;&#x9009;&#x62E9;&#x7B26;&#x5305;&#x62EC;&#xFF1A;E:first-line

CSS3&#x5C06;&#x4F2A;&#x5BF9;&#x8C61;&#x9009;&#x62E9;&#x7B26;(Pseudo-Element Selectors)&#x524D;&#x9762;&#x7684;&#x5355;&#x4E2A;&#x5192;&#x53F7;(:)&#x4FEE;&#x6539;&#x4E3A;&#x53CC;&#x5192;&#x53F7;(::)&#x7528;&#x4EE5;&#x533A;&#x522B;&#x4F2A;&#x7C7B;&#x9009;&#x62E9;&#x7B26;(Pseudo-Classes Selectors)&#xFF0C;&#x4F46;&#x4EE5;&#x524D;&#x7684;&#x5199;&#x6CD5;&#x4ECD;&#x7136;&#x6709;&#x6548;&#x3002;

&#x5373;E:first-letter&#x53EF;&#x8F6C;&#x5316;&#x4E3A;E::first-letter
&#x517C;&#x5BB9;&#x6027;&#xFF1A;&#x652F;&#x6301;IE9.0+,Firefox2.0+&#x3001;Chrome4.0+&#x3001;Safari3.1+&#x3001;Opera3.5+&#x3001;iOS Safari3.2+&#x3001;
Android Browser2.1+&#x3001;Android Chrome18.0+&#x3002;
</code></pre><blockquote>
<p>&#x6CE8;&#xFF1A;&#x5BF9;&#x4E8E; CSS 2, &#x4F2A;&#x5143;&#x7D20;&#x91C7;&#x7528;&#x5355;&#x5192;&#x53F7;&#x524D;&#x7F00;&#x8BED;&#x6CD5;. &#x56E0;&#x4E3A;&#x4F2A;&#x7C7B;&#x4E5F;&#x662F;&#x540C;&#x6837;&#x7684;&#x8BED;&#x6CD5;,&#x6240;&#x4EE5;&#x4F7F;&#x5F97;&#x4E24;&#x8005;&#x96BE;&#x4EE5;&#x533A;&#x5206;. CSS2.1 &#x6539;&#x53D8;&#x4E86;&#x4F2A;&#x5143;&#x7D20;&#x7684;&#x524D;&#x7F00;&#x8BED;&#x6CD5;&#x53EF;&#x4EE5;&#x89E3;&#x51B3;&#x8FD9;&#x4E2A;&#x95EE;&#x9898;. &#x73B0;&#x5728;&#x4F2A;&#x5143;&#x7D20;&#x91C7;&#x7528;&#x53CC;&#x5192;&#x53F7;&#x524D;&#x7F00;, &#x5E76;&#x4E14;&#x4F2A;&#x7C7B;&#x4ECD;&#x7136;&#x91C7;&#x7528;&#x5355;&#x5192;&#x53F7;&#x524D;&#x7F00;.
CSS2&#x4F2A;&#x7C7B;&#x5355;&#x5192;&#x53F7;&#x8BED;&#x6CD5;&#x5DF2;&#x5F97;&#x5230;&#x5E7F;&#x6CDB;&#x652F;&#x6301;&#x65F6;, &#x6240;&#x6709;&#x652F;&#x6301;&#x53CC;&#x5192;&#x53F7;&#x7684;&#x6D4F;&#x89C8;&#x5668;&#x540C;&#x6837;&#x4E5F;&#x652F;&#x6301;&#x65E7;&#x7684;&#x5355;&#x5192;&#x53F7;&#x8BED;&#x6CD5;.</p>
</blockquote>
<pre><code class="lang-html">&#x793A;&#x4F8B;&#xFF1A;&#x628A;&#x7B2C;&#x4E00;&#x884C;&#x7B2C;&#x4E00;&#x4E2A;&#x5B57;&#x5B57;&#x4F53;&#x989C;&#x8272;&#x6539;&#x4E3A;&#x7EA2;&#x8272;&#x4E14;&#x53D8;&#x5927;
<span class="hljs-tag">&lt;<span class="hljs-title">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">&quot;utf-8&quot;</span> /&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">style</span>&gt;</span><span class="css">
            <span class="hljs-tag">h1</span><span class="hljs-rules">{<span class="hljs-rule"><span class="hljs-attribute">font-size</span>:<span class="hljs-value"><span class="hljs-number">16px</span></span></span>;}</span>
            <span class="hljs-tag">p</span><span class="hljs-rules">{
                <span class="hljs-rule"><span class="hljs-attribute">width</span>:<span class="hljs-value"><span class="hljs-number">200px</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">padding</span>:<span class="hljs-value"><span class="hljs-number">5px</span> <span class="hljs-number">10px</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">border</span>:<span class="hljs-value"><span class="hljs-number">1px</span> solid <span class="hljs-hexcolor">#ddd</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">font</span>:<span class="hljs-value"><span class="hljs-number">14px</span> </span></span>;
            }</span>
            <span class="hljs-rule"><span class="hljs-attribute">p</span>:<span class="hljs-value">:first-letter {
                float:left</span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">font-size</span>:<span class="hljs-value"><span class="hljs-number">40px</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">line-height</span>:<span class="hljs-value"><span class="hljs-number">1</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">color</span>:<span class="hljs-value"> red</span></span>;
                }
        </span><span class="hljs-tag">&lt;/<span class="hljs-title">style</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">h1</span>&gt;</span>&#x5E38;&#x7528;&#x7684;&#x9996;&#x5B57;&#x4E0B;&#x6C89;&#x6548;&#x679C;<span class="hljs-tag">&lt;/<span class="hljs-title">h1</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">p</span>&gt;</span>&#x7F8E;&#x56FD;&#x603B;&#x7EDF;&#x7279;&#x6717;&#x666E;&#x4E0E;&#x767D;&#x5BAB;&#x5B9E;&#x4E60;&#x751F;&#x5408;&#x5F71; &#x7EC8;&#x4E8E;&#x7AD9;&#x5728;&#x4E86;&#x4E2D;&#x5FC3;&#xFF01;&#x7F8E;&#x56FD;&#x603B;&#x7EDF;&#x7279;&#x6717;&#x666E;&#x4E0E;&#x767D;&#x5BAB;&#x5B9E;&#x4E60;&#x751F;&#x5408;&#x5F71; &#x7EC8;&#x4E8E;&#x7AD9;&#x5728;&#x4E86;&#x4E2D;&#x5FC3;&#xFF01;&#x7F8E;&#x56FD;&#x603B;&#x7EDF;&#x7279;&#x6717;&#x666E;&#x4E0E;&#x767D;&#x5BAB;&#x5B9E;&#x4E60;&#x751F;&#x5408;&#x5F71; &#x7EC8;&#x4E8E;&#x7AD9;&#x5728;&#x4E86;&#x4E2D;&#x5FC3;&#xFF01;<span class="hljs-tag">&lt;/<span class="hljs-title">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">html</span>&gt;</span>
</code></pre>
<h3 id="efirstlineefirstline">E:first-line/E::first-line</h3>
<pre><code>&#x8BED;&#x6CD5;&#xFF1A;
E:first-line/E::first-line { xxx }
&#x8BF4;&#x660E;&#xFF1A;
&#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;&#x5185;&#x7684;&#x7B2C;&#x4E00;&#x884C;&#x7684;&#x6837;&#x5F0F;&#x3002;
&#x517C;&#x5BB9;&#x6027;&#xFF1A;&#x652F;&#x6301;IE9.0+,Firefox2.0+&#x3001;Chrome4.0+&#x3001;Safari3.1+&#x3001;Opera3.5+&#x3001;iOS Safari3.2+&#x3001;
Android Browser2.1+&#x3001;Android Chrome18.0+&#x3002;
</code></pre><pre><code class="lang-html">&#x793A;&#x4F8B;&#xFF1A;&#x628A;&#x7B2C;&#x4E00;&#x884C;&#x5B57;&#x4F53;&#x989C;&#x8272;&#x6539;&#x4E3A;&#x7EA2;&#x8272;
<span class="hljs-tag">&lt;<span class="hljs-title">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">&quot;utf-8&quot;</span> /&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">style</span>&gt;</span><span class="css">
            <span class="hljs-tag">h1</span><span class="hljs-rules">{<span class="hljs-rule"><span class="hljs-attribute">font-size</span>:<span class="hljs-value"><span class="hljs-number">16px</span></span></span>;}</span>
            <span class="hljs-tag">p</span><span class="hljs-rules">{
                <span class="hljs-rule"><span class="hljs-attribute">width</span>:<span class="hljs-value"><span class="hljs-number">200px</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">padding</span>:<span class="hljs-value"><span class="hljs-number">5px</span> <span class="hljs-number">10px</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">border</span>:<span class="hljs-value"><span class="hljs-number">1px</span> solid <span class="hljs-hexcolor">#ddd</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">font</span>:<span class="hljs-value"><span class="hljs-number">14px</span> </span></span>;
            }</span>
            <span class="hljs-rule"><span class="hljs-attribute">p</span>:<span class="hljs-value">:first-line {
                color: red</span></span>;
                }
        </span><span class="hljs-tag">&lt;/<span class="hljs-title">style</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">h1</span>&gt;</span>&#x5E38;&#x7528;&#x7684;&#x9996;&#x5B57;&#x4E0B;&#x6C89;&#x6548;&#x679C;<span class="hljs-tag">&lt;/<span class="hljs-title">h1</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">p</span>&gt;</span>&#x7F8E;&#x56FD;&#x603B;&#x7EDF;&#x7279;&#x6717;&#x666E;&#x4E0E;&#x767D;&#x5BAB;&#x5B9E;&#x4E60;&#x751F;&#x5408;&#x5F71; &#x7EC8;&#x4E8E;&#x7AD9;&#x5728;&#x4E86;&#x4E2D;&#x5FC3;&#xFF01;&#x7F8E;&#x56FD;&#x603B;&#x7EDF;&#x7279;&#x6717;&#x666E;&#x4E0E;&#x767D;&#x5BAB;&#x5B9E;&#x4E60;&#x751F;&#x5408;&#x5F71; &#x7EC8;&#x4E8E;&#x7AD9;&#x5728;&#x4E86;&#x4E2D;&#x5FC3;&#xFF01;&#x7F8E;&#x56FD;&#x603B;&#x7EDF;&#x7279;&#x6717;&#x666E;&#x4E0E;&#x767D;&#x5BAB;&#x5B9E;&#x4E60;&#x751F;&#x5408;&#x5F71; &#x7EC8;&#x4E8E;&#x7AD9;&#x5728;&#x4E86;&#x4E2D;&#x5FC3;&#xFF01;<span class="hljs-tag">&lt;/<span class="hljs-title">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">html</span>&gt;</span>
</code></pre>
<h3 id="ebeforeebefore">E:before/E::before</h3>
<pre><code>&#x8BED;&#x6CD5;&#xFF1A;
E:before/E::before { xxx }
&#x8BF4;&#x660E;&#xFF1A;
::before &#x4F1A;&#x4E3A;&#x5F53;&#x524D;&#x5143;&#x7D20;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5B50;&#x5143;&#x7D20;&#x4F5C;&#x4E3A;&#x4F2A;&#x5143;&#x7D20;&#x3002;&#x5E38;&#x901A;&#x8FC7; content &#x5C5E;&#x6027;&#x6765;&#x4E3A;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x6DFB;&#x52A0;&#x4FEE;&#x9970;&#x6027;&#x7684;&#x5185;&#x5BB9;&#x3002; 
&#x6B64;&#x5143;&#x7D20;&#x9ED8;&#x8BA4;&#x4E3A;&#x884C;&#x5185;&#x5143;&#x7D20;&#x3002;&#x8BBE;&#x7F6E;&#x5728;&#x5BF9;&#x8C61;&#x524D;&#xFF08;&#x4F9D;&#x636E;&#x5BF9;&#x8C61;&#x6811;&#x7684;&#x903B;&#x8F91;&#x7ED3;&#x6784;&#xFF09;&#x53D1;&#x751F;&#x7684;&#x5185;&#x5BB9;&#x3002;  

CSS3&#x5C06;&#x4F2A;&#x5BF9;&#x8C61;&#x9009;&#x62E9;&#x7B26;(Pseudo-Element Selectors)&#x524D;&#x9762;&#x7684;&#x5355;&#x4E2A;&#x5192;&#x53F7;(:)&#x4FEE;&#x6539;&#x4E3A;&#x53CC;&#x5192;&#x53F7;(::)&#x7528;&#x4EE5;&#x533A;&#x522B;&#x4F2A;&#x7C7B;&#x9009;&#x62E9;&#x7B26;(Pseudo-Classes Selectors)&#xFF0C;&#x4F46;&#x4EE5;&#x524D;&#x7684;&#x5199;&#x6CD5;&#x4ECD;&#x7136;&#x6709;&#x6548;&#x3002;   
&#x5373;E:before&#x53EF;&#x8F6C;&#x5316;&#x4E3A;E::before
&#x517C;&#x5BB9;&#x6027;&#xFF1A;&#x652F;&#x6301;IE9.0+,Firefox2.0+&#x3001;Chrome4.0+&#x3001;Safari3.1+&#x3001;Opera3.5+&#x3001;iOS Safari3.2+&#x3001;
Android Browser2.1+&#x3001;Android Chrome18.0+&#x3002;
</code></pre><pre><code class="lang-html">&#x793A;&#x4F8B;&#xFF1A;
<span class="hljs-tag">&lt;<span class="hljs-title">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">&quot;UTF-8&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">style</span>&gt;</span><span class="css">
            <span class="hljs-class">.text</span> <span class="hljs-rules">{
               <span class="hljs-rule"><span class="hljs-attribute">background-color</span>:<span class="hljs-value"> <span class="hljs-hexcolor">#5BC8F7</span></span></span>;
            }</span>

            <span class="hljs-rule"><span class="hljs-attribute">.text</span>:<span class="hljs-value">:before {
               content:          <span class="hljs-string">&quot;&#x6211;&#x5728;&#x4F60;&#x524D;&#x9762;&quot;</span></span></span>;
               <span class="hljs-rule"><span class="hljs-attribute">background-color</span>:<span class="hljs-value"> <span class="hljs-hexcolor">#FFBA10</span></span></span>;
               <span class="hljs-rule"><span class="hljs-attribute">border-color</span>:<span class="hljs-value">     black</span></span>;
            }
        </span><span class="hljs-tag">&lt;/<span class="hljs-title">style</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">span</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;text&quot;</span>&gt;</span>&#x6211;&#x5728;&#x540E;&#x9762;<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">html</span>&gt;</span>
</code></pre>
<h3 id="eaftereafter">E:after/E::after</h3>
<pre><code>&#x8BED;&#x6CD5;&#xFF1A;
E:after/E::after { xxx }
&#x8BF4;&#x660E;&#xFF1A;
::after&#x7528;&#x6765;&#x5339;&#x914D;&#x5DF2;&#x9009;&#x4E2D;&#x5143;&#x7D20;&#x7684;&#x4E00;&#x4E2A;&#x865A;&#x62DF;&#x7684;&#x6700;&#x540E;&#x5B50;&#x5143;&#x7D20;&#x3002;
&#x901A;&#x5E38;&#x4F1A;&#x914D;&#x5408;content&#x5C5E;&#x6027;&#x6765;&#x4E3A;&#x8BE5;&#x5143;&#x7D20;&#x6DFB;&#x52A0;&#x88C5;&#x9970;&#x5185;&#x5BB9;&#x3002;&#x8FD9;&#x4E2A;&#x865A;&#x62DF;&#x5143;&#x7D20;&#x9ED8;&#x8BA4;&#x662F;&#x884C;&#x5185;&#x5143;&#x7D20;&#x3002; 
&#x8BBE;&#x7F6E;&#x5728;&#x5BF9;&#x8C61;&#x540E;&#xFF08;&#x4F9D;&#x636E;&#x5BF9;&#x8C61;&#x6811;&#x7684;&#x903B;&#x8F91;&#x7ED3;&#x6784;&#xFF09;&#x53D1;&#x751F;&#x7684;&#x5185;&#x5BB9;&#x3002;
</code></pre><pre><code class="lang-html">&#x793A;&#x4F8B;&#xFF1A;
<span class="hljs-tag">&lt;<span class="hljs-title">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">&quot;UTF-8&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">style</span>&gt;</span><span class="css">
            <span class="hljs-class">.text</span> <span class="hljs-rules">{
               <span class="hljs-rule"><span class="hljs-attribute">background-color</span>:<span class="hljs-value"> <span class="hljs-hexcolor">#5BC8F7</span></span></span>;
            }</span>

            <span class="hljs-rule"><span class="hljs-attribute">.text</span>:<span class="hljs-value">:after {
               content:          <span class="hljs-string">&quot;&#x6211;&#x4E5F;&#x5728;&#x4F60;&#x540E;&#x9762;&quot;</span></span></span>;
               <span class="hljs-rule"><span class="hljs-attribute">background-color</span>:<span class="hljs-value"> <span class="hljs-hexcolor">#FFBA10</span></span></span>;
               <span class="hljs-rule"><span class="hljs-attribute">border-color</span>:<span class="hljs-value">     black</span></span>;
            }
        </span><span class="hljs-tag">&lt;/<span class="hljs-title">style</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">span</span> <span class="hljs-attribute">class</span>=<span class="hljs-value">&quot;text&quot;</span>&gt;</span>&#x6211;&#x5728;&#x540E;&#x9762;<span class="hljs-tag">&lt;/<span class="hljs-title">span</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">html</span>&gt;</span>
</code></pre>
<h3 id="eplaceholder">E::placeholder</h3>
<pre><code>&#x8BED;&#x6CD5;&#xFF1A;
E::placeholder { xxx }
&#x8BF4;&#x660E;&#xFF1A;
&#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;&#x6587;&#x5B57;&#x5360;&#x4F4D;&#x7B26;&#x7684;&#x6837;&#x5F0F;&#x3002;
::placeholder &#x4F2A;&#x5143;&#x7D20;&#x7528;&#x4E8E;&#x63A7;&#x5236;&#x8868;&#x5355;&#x8F93;&#x5165;&#x6846;&#x5360;&#x4F4D;&#x7B26;&#x7684;&#x5916;&#x89C2;&#xFF0C;&#x5B83;&#x5141;&#x8BB8;&#x5F00;&#x53D1;&#x8005;/&#x8BBE;&#x8BA1;&#x5E08;&#x6539;&#x53D8;&#x6587;&#x5B57;&#x5360;&#x4F4D;&#x7B26;&#x7684;&#x6837;&#x5F0F;&#xFF0C;&#x9ED8;&#x8BA4;&#x7684;&#x6587;&#x5B57;&#x5360;&#x4F4D;&#x7B26;&#x4E3A;&#x6D45;&#x7070;&#x8272;&#x3002;
&#x5F53;&#x8868;&#x5355;&#x80CC;&#x666F;&#x8272;&#x4E3A;&#x7C7B;&#x4F3C;&#x7684;&#x989C;&#x8272;&#x65F6;&#x5B83;&#x53EF;&#x80FD;&#x6548;&#x679C;&#x5E76;&#x4E0D;&#x662F;&#x5F88;&#x660E;&#x663E;&#xFF0C;&#x90A3;&#x4E48;&#x5C31;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x4F2A;&#x5143;&#x7D20;&#x6765;&#x6539;&#x53D8;&#x6587;&#x5B57;&#x5360;&#x4F4D;&#x7B26;&#x7684;&#x989C;&#x8272;&#x3002;

&#x9700;&#x8981;&#x6CE8;&#x610F;&#x7684;&#x662F;&#xFF0C;&#x9664;&#x4E86;Firefox&#x662F; ::[prefix]placeholder&#xFF0C;&#x5176;&#x4ED6;&#x6D4F;&#x89C8;&#x5668;&#x90FD;&#x662F;&#x4F7F;&#x7528; ::[prefix]input-placeholder
Firefox&#x652F;&#x6301;&#x8BE5;&#x4F2A;&#x5143;&#x7D20;&#x4F7F;&#x7528;text-overflow&#x5C5E;&#x6027;&#x6765;&#x5904;&#x7406;&#x6EA2;&#x51FA;&#x95EE;&#x9898;&#x3002;
&#x517C;&#x5BB9;&#x6027;&#xFF1A;IE&#x8981;&#x52A0;&#x524D;&#x7F00;-ms-&#x3001;Firefox&#x8981;&#x52A0;&#x524D;&#x7F00;-moz-&#x3001;Chrome&#x3001;Safari&#x3001;Opera&#x3001;Android Browser&#x3001;Android Chrome&#x8981;&#x52A0;&#x524D;&#x7F00;-webkit-
</code></pre><pre><code class="lang-html">&#x793A;&#x4F8B;&#xFF1A;
<span class="hljs-tag">&lt;<span class="hljs-title">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">&quot;UTF-8&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">style</span>&gt;</span><span class="css">
            <span class="hljs-tag">body</span><span class="hljs-rules">{
                <span class="hljs-rule"><span class="hljs-attribute">background</span>:<span class="hljs-value">   lightgrey</span></span>;
            }</span>
            <span class="hljs-rule"><span class="hljs-attribute">input</span>:<span class="hljs-value">:-webkit-input-placeholder {
                color: green</span></span>;
            }
            <span class="hljs-rule"><span class="hljs-attribute">input</span>:<span class="hljs-value">-ms-input-placeholder { // IE10+
                color: green</span></span>;
            }
            <span class="hljs-rule"><span class="hljs-attribute">input</span>:<span class="hljs-value">-moz-placeholder { // Firefox4-<span class="hljs-number">18</span>
                color: green</span></span>;
            }
            <span class="hljs-rule"><span class="hljs-attribute">input</span>:<span class="hljs-value">:-moz-placeholder { // Firefox19+
                color: green</span></span>;
            }
        </span><span class="hljs-tag">&lt;/<span class="hljs-title">style</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>
          <span class="hljs-tag">&lt;<span class="hljs-title">input</span> <span class="hljs-attribute">id</span>=<span class="hljs-value">&quot;test&quot;</span> <span class="hljs-attribute">placeholder</span>=<span class="hljs-value">&quot;Placeholder text!&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">html</span>&gt;</span>
</code></pre>
<h3 id="eselection">E::selection</h3>
<pre><code>&#x8BED;&#x6CD5;&#xFF1A;E::selection{xxx}
&#x8BF4;&#x660E;&#xFF1A;&#x8BBE;&#x7F6E;&#x5BF9;&#x8C61;&#x88AB;&#x9009;&#x62E9;&#x65F6;&#x7684;&#x6837;&#x5F0F;&#xFF0C;&#x5E94;&#x7528;&#x4E8E;&#x6587;&#x6863;&#x4E2D;&#x88AB;&#x7528;&#x6237;&#x9009;&#x4E2D;&#x7684;&#x90E8;&#x5206;&#xFF08;&#x6BD4;&#x5982;&#x4F7F;&#x7528;&#x9F20;&#x6807;&#x6216;&#x5176;&#x4ED6;&#x9009;&#x62E9;&#x8BBE;&#x5907;&#x9009;&#x4E2D;&#x7684;&#x90E8;&#x5206;&#xFF09;&#x3002;   
</code></pre><blockquote>
<p>&#x9700;&#x8981;&#x6CE8;&#x610F;&#x7684;&#x662F;&#xFF0C;::selection&#x53EA;&#x80FD;&#x5B9A;&#x4E49;&#x88AB;&#x9009;&#x62E9;&#x65F6;&#x7684;background-color&#xFF0C;color&#x53CA;text-shadow(IE11&#x5C1A;&#x4E0D;&#x652F;&#x6301;&#x5B9A;&#x4E49;&#x8BE5;&#x5C5E;&#x6027;)&#x3002;<br>::selection&#x4E2D;&#x7684;text-shadow&#x5C5E;&#x6027;&#x4EC5;&#x6709;Chrome, Safari &#x548C; Firefox 17+&#x652F;&#x6301;&#x3002;
&#x517C;&#x5BB9;&#x6027;&#xFF1A;&#x53EA;&#x6709;Firefox&#x6D4F;&#x89C8;&#x5668;&#x9700;&#x8981;&#x52A0;&#x524D;&#x7F00;&#xFF08;-moz&#xFF09; &#x3002;</p>
<pre><code class="lang-html">&#x793A;&#x4F8B;&#xFF1A;
<span class="hljs-tag">&lt;<span class="hljs-title">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">meta</span> <span class="hljs-attribute">charset</span>=<span class="hljs-value">&quot;UTF-8&quot;</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">style</span>&gt;</span><span class="css">
            <span class="hljs-rule"><span class="hljs-attribute">p</span>:<span class="hljs-value">:-moz-selection{
                background:<span class="hljs-hexcolor">#000</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">color</span>:<span class="hljs-value"><span class="hljs-hexcolor">#f00</span></span></span>;
                }
            <span class="hljs-rule"><span class="hljs-attribute">p</span>:<span class="hljs-value">:selection{
                background:<span class="hljs-hexcolor">#000</span></span></span>;
                <span class="hljs-rule"><span class="hljs-attribute">color</span>:<span class="hljs-value"><span class="hljs-hexcolor">#f00</span></span></span>;
                }
        </span><span class="hljs-tag">&lt;/<span class="hljs-title">style</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">h1</span>&gt;</span>&#x9009;&#x4E2D;&#x4E0B;&#x9762;&#x7684;&#x6587;&#x5B57;&#xFF0C;&#x770B;&#x770B;&#x5B83;&#x7684;&#x989C;&#x8272;<span class="hljs-tag">&lt;/<span class="hljs-title">h1</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-title">p</span>&gt;</span>&#x4F60;&#x9009;&#x4E2D;&#x8FD9;&#x6BB5;&#x6587;&#x5B57;&#x540E;&#xFF0C;&#x770B;&#x770B;&#x5B83;&#x4EEC;&#x7684;&#x6587;&#x672C;&#x989C;&#x8272;&#x548C;&#x80CC;&#x666F;&#x8272;&#xFF0C;&#x5C31;&#x80FD;&#x660E;&#x767D;::selection&#x7684;&#x4F5C;&#x7528;&#x3002;<span class="hljs-tag">&lt;/<span class="hljs-title">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">html</span>&gt;</span>
</code></pre>
</blockquote>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../lesson/css/扩展.html" class="navigation navigation-prev " aria-label="Previous page: 属性选择器"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../lesson/css/0724-2.html" class="navigation navigation-next " aria-label="Next page: class类选择器"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"expandable-chapters-small":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
